﻿using AutofacProject.Entity;
using AutofacProject.Service.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace AutofacProject.Controllers
{
   
    public class MoviesController : Controller
    {
        //只读字段
        private readonly IMoviesService _moviesService;

        //构造函数
        public MoviesController(IMoviesService moviesService)
        {
            _moviesService = moviesService;
        }
   
        public ActionResult Index()
        {
            //pcx
            List<Movie> list= _moviesService.GetList();
            return View();
        }
    }
}